﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Templates_General_NavigateFirstChild : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (AcmsContext.CurrentPost != null && AcmsContext.CurrentPost.Children.Count > 0)
            {
                var newUrl = ResolveUrl(AcmsContext.CurrentPost.Children[0].Url);
                Response.Redirect(newUrl, true);
            }
        }
    }
}
